<template>
  <div>
    <h2>第二个组件</h2>
    <div>{{text}}</div>
    <child03 v-bind="$attrs"/>
  </div>
</template>

<script>
import child03 from './child03'
export default {
  props: {
    text: {
      type: String | Number
    }
  },
  // 解决父组件传递过来的值,没被使用的情况下挂载在本组件上(类似自定义属性)
  inheritAttrs: false,
  components: {
    child03
  },
  mounted () {
    console.log(this.$attrs)
  }
}
</script>

<style scoped>
</style>
